<?php
// +----------------------------------------------------------------------
// | genadmin [ genadmin快速开发框架 ]
// +----------------------------------------------------------------------
// | Author: your name
// +----------------------------------------------------------------------
namespace app\admin\validate\finance;

use think\Validate;

/**
 * 余额记录验证器
 */
class UserMoneyLogValidate extends Validate
{
    /**
     * 定义验证规则
     */
    protected $rule =   [
        'user_id' => 'require',
        'money' => 'require',
        'before' => 'require',
        'after' => 'require',
    ];

    /**
     * 定义错误信息
     */
    protected $message  =   [
        'user_id' => '会员ID必须填写',
        'money' => '变更余额必须填写',
        'before' => '变更前余额必须填写',
        'after' => '变更后余额必须填写',
    ];

    /**
     * 定义场景
     */
    protected $scene = [
        'save' => [
            'user_id',
            'money',
            'before',
            'after',
        ],
        'update' => [
            'user_id',
            'money',
            'before',
            'after',
        ],
    ];

}
